<template>
    <div id="app">
        <router-view/>
    </div>
</template>

<script>
    export default {
        // 解决刷新浏览器没有tabs标签页的问题
        watch: {
            $route(to, from) {
                if (to.path !== '/login') {
                    let tab = {
                        title: to.meta.title,
                        name: to.name
                    };
                    this.$store.commit('addTab', tab);
                }
            }
        }
    }
</script>

<style>
    html, body, #app {
        font-family: 'Helvetica Neue', 'Hiragino Sans GB', 'WenQuanYi Micro Hei', 'Microsoft Yahei', sans-serif;
        height: 100%;
        padding: 0;
        margin: 0;
        font-size: 15px;
    }
</style>
